<div class="twelve columns">

  <div id="cart">

    <!-- Button -->
    <div class="cart-btn">
      <a href="{:U('Cart/index')}" class="button adc">¥{$cart['total']}</a>
    </div>

    <div class="cart-list">

      <div class="arrow"></div>

      <div class="cart-amount">
        <span>购物车里有{$cart['items']|count}样东西</span>
      </div>

      <!-- 更新购物车会用到的URL变量 -->
      <script>
        var product_detail_url = "{:('Product/detail')}";
        var product_image_url = "__PUBLIC__/Book_img/";
      </script>

      <ul>

        <foreach name="cart.items" item="book" key="k">
        <if condition="$k lt 2">
        <li>
        <a href="{:U('Product/detail', array('bid' => $book['id']))}" class="to_detail">
          <img src="__PUBLIC__/Book_img/{$book.id}/main.jpg" alt="" class="cover_img" />
        </a>
        <a href="{:U('Product/detail', array('bid' => $book['id']))}" class="to_detail book_title">{$book.title}</a>
        <span class="quantity_price">{$book.quantity} x ¥{$book.price}</span>
        <div class="clearfix"></div>
        </li>
        <elseif condition="$k == 2"/>
        <li>目前仅显示2件, 更多请到购物车查看</li>
        </if>
        </foreach>

      </ul>

      <div class="cart-buttons button">
        <a href="{:U('Cart/index')}" class="view-cart" ><span data-hover="View Cart"><span>查看购物车</span></span></a>
        <a href="{:U('Cart/checkout')}" class="checkout"><span data-hover="Checkout">结算</span></a>
      </div>
      <div class="clearfix">

      </div>
    </div>

  </div>

  <!-- Search -->
  <nav class="top-search">
    <form action="index.html#" method="get">
      <button><i class="fa fa-search"></i></button>
      <input class="search-field" type="text" placeholder="Search" value=""/>
    </form>
  </nav>

</div> <!-- /Shopping Cart -->
